home *** CD-ROM | disk | FTP | other *** search
/ Champak 132 (Alt) / Vol 132.iso / games / hewitt.swf / scripts / DefineButton2_1677 / BUTTONCONDACTION on(press).as
Encoding:
Text File  |  2011-06-09  |  1.3 KB  |  50 lines

  1. on(press){
  2.    _root["taken" + (_root._currentframe + 40)] = 1;
  3.    if(_root.inven._currentframe == 1)
  4.    {
  5.       if(_root.micon._currentframe == 1 && _root.range == true)
  6.       {
  7.          if(_root.even22 == 0)
  8.          {
  9.             _root.even22 = 1;
  10.             _root.take = 21;
  11.          }
  12.          else if(_root.even22 == 1)
  13.          {
  14.             _root.even22 = 2;
  15.             i = 1;
  16.             while(i < 40)
  17.             {
  18.                if(_root.inven["box" + i]._currentframe == 21)
  19.                {
  20.                   _root.inven["box" + i].gotoAndStop(45);
  21.                }
  22.                i++;
  23.             }
  24.          }
  25.          else
  26.          {
  27.             i = 1;
  28.             while(i < 40)
  29.             {
  30.                if(_root.inven["box" + i]._currentframe == 45)
  31.                {
  32.                   _root.inven["box" + i].gotoAndStop(46);
  33.                }
  34.                i++;
  35.             }
  36.          }
  37.          _root.txt_number = 1;
  38.          _root.sfx.gotoAndStop(3);
  39.          _root.next_dis1 = 2;
  40.          _root.next_txt1 = "Score! 25 cents can go a long way you know.";
  41.       }
  42.       if(_root.micon._currentframe == 2)
  43.       {
  44.          _root.next_dis1 = 2;
  45.          _root.next_txt1 = "Looks like a quarter.";
  46.       }
  47.    }
  48.    this.gotoAndStop(2);
  49. }
  50.